import request from '@/utils/request'

// 查询库位列表
export function listLOCATION(query) {
  return request({
    url: '/system/warehouse/location/list',
    method: 'get',
    params: query
  })
}

// 查询库位详细
export function getLOCATION(locationId) {
  return request({
    url: '/system/warehouse/location/' + locationId,
    method: 'get'
  })
}

// 新增库位
export function addLOCATION(data) {
  return request({
    url: '/system/warehouse/location',
    method: 'post',
    data: data
  })
}

// 修改库位
export function updateLOCATION(data) {
  return request({
    url: '/system/warehouse/location',
    method: 'put',
    data: data
  })
}

// 删除库位
export function delLOCATION(locationId) {
  return request({
    url: '/system/warehouse/location/' + locationId,
    method: 'delete'
  })
}

// 根据decid查询数据
export function selelectLOCATIONBYdecId(query) {
  return request({
    url:  '/system/warehouse/location/lists',
    method: 'post',
    params: query
  })
}
export function loselelectSTOCKBYlocationId(locationId) {
  return request({
    url: '/system/warehouse/location/list/dec/' + locationId,
    method: 'post'
  })
}
export function updateSts(data) {
  return request({
    url: '/system/warehouse/location/sts',
    method: 'post',
    data: data
  })
}
